package com.pms.service;

import com.pms.common.PageBean;
import com.pms.pojo.WorkAttendance;
import com.pms.pojo.statistics.*;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.util.Date;
import java.util.List;

public interface WorkAttendanceService {


    PageBean<WorkAttendance> page(
            Integer page,
            Integer pageSize,
            String userName,
            Integer operateType,
            Date startTime,
            Date endTime
    );

    WorkAttendance getById(Long id);

    void update(WorkAttendance workAttendance);

    void delete(Long id);

    void checkIn(WorkAttendance workAttendance);

    /**
     * 根据用户id查询当前用户的所有打卡记录
     *
     * @param userId
     * @return
     */
    List<WorkAttendance> getByUserId(Long userId);

    /**
     * 获取考勤统计数据
     */
    AttendanceStatistics getAttendanceStatistics(AttendanceStatisticsQuery query);

    /**
     * 获取每日考勤统计数据
     */
    List<DailyAttendance> getDailyAttendanceStatistics(AttendanceStatisticsQuery query);

    /**
     * 获取部门考勤统计数据
     */
    List<DepartmentAttendance> getDepartmentAttendanceStatistics(AttendanceStatisticsQuery query);

    /**
     * 获取考勤详细记录
     */
    PageBean<AttendanceRecord> getAttendanceRecords(Integer page, Integer pageSize, AttendanceStatisticsQuery query);


}